ComponentOne PDF for WPF and Silverlight
Step 1 of 4: Creating an Application with the C1PdfDocument Object
PDF for WPF and Silverlight Overview > Getting Started > Quick Start > Step 1 of 4: Creating an Application with the C1PdfDocument Object

In this step, you'll create a Silverlight application and add a C1PdfDocument object.

  1. In Visual Studio, select File | New | Project.
  2. In the New Project dialog box, select a language in the left pane, and in the templates list select WPF Application or Silverlight Application. Enter a Name for your project and click OK. The New WPF or Silverlight Application dialog box will appear.
  3. Click OK to close the New WPF Application or New Silverlight Application dialog box and create your project.
  4. Right-click the project name in the Solution Explorer and select Add Reference.
  5. In the Add Reference dialog box, locate and select the C1.WPF.Pdf.dll or the C1.Silverlight.Pdf.dll and click OK to add the reference to your project.
  6. Open the MainPage.xaml.cs file in Visual Studio and add the following code at the top of the page with the using statements:

using C1.Silverlight.Pdf;

using System.IO;

  1. Then add the following code for the MainPage:

// Create the C1PdfDocument object

C1PdfDocument pdf = new C1PdfDocument();

public MainPage()

{

     InitializeComponent();

     // Make the window hit test visible.

     LayoutRoot.Background = new SolidColorBrush(Colors.Transparent);

}

You've successfully created a WPF or Silverlight application with a C1PdfDocument object.